package com.growthsee.rider.service.impl;

import com.growthsee.rider.domain.view.RiderAttachmentView;
import com.growthsee.rider.service.FileUploadService;
import com.growthsee.rider.utils.ci.QCloudCosUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
@Service
public class FileUploadServiceImpl implements FileUploadService {

    @Override
    public RiderAttachmentView upload(MultipartFile multipartFile) {
        RiderAttachmentView riderAttachmentView= QCloudCosUtils.upload(multipartFile);
        return riderAttachmentView;
    }

    @Override
    public String upload(File file) {
        String url= QCloudCosUtils.upload(file);
        return url;
    }
}
